"""
文件管理URL配置
"""
from django.urls import path
from . import views

urlpatterns = [
    # 文件分类
    path('categories/', views.FileCategoryListView.as_view(), name='file_category_list'),
    
    # 文件管理
    path('', views.UploadedFileListView.as_view(), name='uploaded_file_list'),
    path('upload/', views.upload_file, name='upload_file'),
    path('<int:pk>/', views.UploadedFileDetailView.as_view(), name='uploaded_file_detail'),
    path('<int:pk>/download/', views.download_file, name='download_file'),
    path('<int:pk>/view/', views.view_file, name='view_file'),
    
    # 文件分享
    path('<int:file_id>/share/', views.create_file_share, name='create_file_share'),
    path('shares/', views.FileShareListView.as_view(), name='file_share_list'),
    path('shares/<str:token>/', views.access_shared_file, name='access_shared_file'),
    
    # 访问日志
    path('access-logs/', views.FileAccessLogListView.as_view(), name='file_access_log_list'),
    
    # 统计
    path('statistics/', views.file_statistics, name='file_statistics'),
]
